/*给jQuery添加滚轮事件*/
$.fn.extend({
    mouseWheel:function (upfun,downfun){
        this.each(function(index,obj){
            if(obj.addEventListener){
                obj.addEventListener("mousewheel",fun,false)
                obj.addEventListener("DOMMouseScroll",fun,false)
            }
            else{
                obj.attachEvent("onmousewheel",fun)
            }
            function fun(e){
                var ev=e||window.event
                if(ev.detail==-3||ev.wheelDelta==120){
                    if(upfun){upfun.call(obj)}
                }
                else if(ev.detail==3||ev.wheelDelta==-120){
                    if(downfun){downfun.call(obj)}
                }
            }
        })
        return this;
    }
})